home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / xgui / sources / ui_status.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-25  |  2.0 KB  |  85 lines

  1. /*****************************************************************************
  2.   FILE           : ui_status.c
  3.   SHORTNAME      : status.c
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : display and refresh of status information in graphic windows
  7.   NOTES          :
  8.  
  9.  
  10.   AUTHOR         : Tilman Sommer
  11.   DATE           : 27.8.1990
  12.  
  13.   CHANGED BY     :
  14.   IDENTIFICATION : @(#)ui_status.c    1.9 3/2/94
  15.   SCCS VERSION   : 1.9
  16.   LAST CHANGE    : 3/2/94
  17.  
  18.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  19.              
  20. ******************************************************************************/
  21.  
  22.  
  23. #include <stdio.h>
  24.  
  25. #include "ui.h"
  26. #include "ui_utilP.h"
  27. #include "ui_xWidgets.h"
  28. #include "ui_key.h"
  29. #include "ui_action.h"
  30. #include "ui_selection.h"
  31. #include "ui_main.h"
  32.  
  33. #include "ui_status.ph"
  34.  
  35.  
  36.  
  37. /*****************************************************************************
  38.   FUNCTION : ui_stat_displayStatus
  39.  
  40.   PURPOSE  : display status information.
  41.   RETURNS  : alteration of the status panel
  42.   NOTES    : Except the current raster position, which is taken from the
  43.              parameter, all information is got out from global variables.
  44.  
  45.   UPDATE   :
  46. *****************************************************************************/
  47.  
  48. void ui_stat_displayStatus(struct PosType gridPos)
  49.  
  50. {
  51.     char   string[40];
  52.  
  53.     if (ui_stat_oldFlags != ui_safetyFlg) {
  54.     if (ui_safetyFlg)
  55.         sprintf(string,": safe");
  56.     else
  57.         sprintf(string,": -   ");
  58.     ui_xSetLabel(ui_stat_flagsWidget,string);
  59.     ui_stat_oldFlags = ui_safetyFlg;
  60.     }
  61.  
  62.     if (ui_stat_oldNumberOfSelectedItems != ui_sel_numberOfSelectedItems) {
  63.     sprintf(string,": %-4d", ui_sel_numberOfSelectedItems);
  64.     ui_xSetLabel(ui_stat_selNoWidget,string);
  65.     ui_stat_oldNumberOfSelectedItems = ui_sel_numberOfSelectedItems;
  66.     }
  67.  
  68.     if (ui_utilAreDifferentPositions(gridPos, ui_stat_oldPos)) {
  69.     sprintf(string,"x:%-6d  y:%-6d",gridPos.x, gridPos.y);
  70.     ui_xSetLabel(ui_stat_posWidget,string);
  71.     ui_stat_oldPos = gridPos;
  72.     }
  73. }
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. /* end of file */
  84. /* lines: 77 */
  85.